import { uniStorage } from "./index.js"

export const uniToken = {
  /**
   * 存储token
   * @param token 
   * @param expire 秒值 如没有 不填 
   */
  setToken: function (token, expire = null) {
    uniStorage.save("token", token, expire)
  },
  getToken: function () {
    return uniStorage.getValue("token")
  },
  
  clear:function() {
	  return uniStorage.clear("token")
  }
};